package net.xujialiang.XTestRPA.Service.App;

import net.xujialiang.XTestRPA.Entity.App.AppVersion;
import net.xujialiang.XTestRPA.Entity.XRPAUser;
import net.xujialiang.XTestRPA.Repository.App.AppVersionRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
public class AppService {

    @Autowired
    AppVersionRepository appVersionRepository;

    public AppVersion fetch(String platform) {
        AppVersion app = appVersionRepository.findTopByPlatformOrderByIdDesc(platform);
        return app;
    }
}
